from django.core.mail import send_mail
from celery_tasks.main import celery_app

@celery_app.task(name='send_email_active')
def send_email_active(email_addr,message):
    print('异步邮件1')
    # 发送认证邮件
    subject = "我是师子狗"
    message = message
    from_email = "狮子狗<wubaosai@126.com>"
    recipient_list = [email_addr]
    send_mail(subject=subject, message='', from_email=from_email, recipient_list=recipient_list,html_message=message)
    print('异步邮件2')
